
import 'dart:convert';

List<AnnouncementItem> announcementItemFromJson(String str) => List<AnnouncementItem>.from(json.decode(str).map((x) => AnnouncementItem.fromJson(x)));

String announcementItemToJson(List<AnnouncementItem> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));

class AnnouncementItem {
    AnnouncementItem({
        this.id,
        this.message,
        this.point,
        this.when,
        this.announcementType,
        this.students,
    });

    String? id;
    String? message;
    int? point;
    int? when;
    String? announcementType;
    String? students;


    factory AnnouncementItem.fromJson(Map<String, dynamic> json) => AnnouncementItem(
        id: json["id"],
        message: json["message"],
        point: json["point"],
        when: json["when"],
        announcementType: json["announcementType"],
        students: json["students"],
    );

    Map<String, dynamic> toJson() => {
        "id": id,
        "message": message,
        "point": point,
        "when": when,
        "announcementType": announcementType,
        "students": students,

    };
}